<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Promise微任务处理逻辑</title>
</head>
<body>
    <script>
        setTimeout(() => {
            console.log("定时器");
            setTimeout(() => {
                console.log("settime 定时器");
                new Promise((resolve,reject) => {
                    console.log("settime promise");
                    resolve("settime 微任务");
                }).then(
                    value => console.log(value)
                )

                console.log("settime 后盾人");
            },2000)
        },1000)

        new Promise((resolve,reject) => {
            console.log("promise");
            resolve("微任务");
        }).then(
            value => console.log(value)
        )

        console.log("后盾人");

    </script>
</body>
</html>